package day03;

public class OperDemo4 {
    public static void main(String[] args) {
//赋值运算符的演示
// =，+=，-=，*=，%=，/= 他们都自带强转的
        int a = 5;
        a += 10;//相当于a+(int)(a+10)
        System.out.println(a);//15
        a *= 2;
        System.out.println(a);//30
        a /= 6;
        System.out.println(a);//5
        a *= 9;
        System.out.println(a);//45
        a %= 8;
        System.out.println(a);//5

        //小面试题
        short s = 5;
        //s = s+5; 编译错误 后面是int 前面是short 要大转小 改为s = (shory)(s+5)s
        s += 10;


    }
}
